package com.suiwei.base.controller;

import com.suiwei.mybatisPlus.dao.BookDao;
import com.suiwei.mybatisPlus.entity.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author suiwei
 * @date 2022-10-22 22:28
 */
@RestController
@RequestMapping("/test")
public class TestController {
    @Autowired
    BookDao bookDao;
    @GetMapping("/{id}")
    public Book test(@PathVariable Integer id){
        return bookDao.selectById(id);
    }
    @GetMapping("/")
    public void test(){
        System.out.println(123);
        System.out.println(123);
    }
}
